/* px  em  rem等长度单位演示 */
html {
    font-size: 62.5%;  /* 16px*0.625=10px */
}

body {
    font-size: 1em;
}

.value_px {
    font-size: 32px;
}

.value_em {
    /* em相对于父元素，当前定义中父元素为<body>(默认<body>为16px) */
    font-size: 2em;
}

.value_rem {
    /* rem针对根元素，当前定义中根元素为<html>(默认<html>为16px) */
    font-size: 2rem;
}

/* 颜色值 */
.color_name {
    color: red;
}

.color_hex {
    color: #00ff00;
}

.color_fun {
    color: rgb(0, 0, 255);
}

/* 图片函数url */
.img_url {
    width: 393px;
    height: 105px;
    background-image: url("qq_logo.png");
    font-weight: bolder;
}

/* 常见字体样式属性 */
.font_demo {
    /* font: 400; */
    color: red;
    font-family: 微软雅黑, sans-serif;
    font-size: 2em;
    /* 字体样式——斜体 */
    font-style: italic;
    font-weight: normal;
}

/* 常见文本样式属性 */
.text_demo {
    font-size: 2em;
    border: 1px solid black;
    width: 100rem;
    height: 10rem;
    text-align: left;
    line-height: 10rem;
    /* underline-下划线 line-through-删除线 */
    text-decoration: underline;
    text-indent: 3rem;
    letter-spacing: 1rem;
    word-spacing: 2rem;
}

/* 列表样式属性 */
ul {
    font-size: 2rem;
}

.list_demo1 {
    /* circle-空心圆 square-实心方块 disc-实心圆 */
    list-style: circle inside;
}

.list_demo2 {
    list-style: none;
}

.list_demo3 {
    list-style-image: url(qq_logo.png);
    list-style-type: none;
    list-style-position: inside;
}

.list_demo4 {
    list-style: none url(qq_logo.png) inside;
}

/* 背景样式属性 */
.background_box {
    border: 1px solid red;
    width: 50rem;
    height: 30rem;
}

.background_demo1 {
    background-color: coral;
}

.background_demo2 {
    background-image: url(qq_logo.png);
}

.background_demo3 {
    background-image: url(qq_logo.png);
    /* background-repeat: no-repeat; */
    background-repeat: repeat-y;
}

.background_demo4 {
    background-image: url(qq_logo.png);
    background-repeat: no-repeat;
    /* 若为数值，则前一个数值为距离左端，后一个数值为距离顶端 */
    background-position: center center;
}

.background_demo5 {
    background-image: url(qq_logo.png);
    background-repeat: no-repeat;
    background-position: top right;
    background-attachment: fixed;
}

.background_demo6 {
    background: #c2f3c2 url(qq_logo.png) repeat-x top right fixed;
}

/* 表格样式 */
.table_demo {
    font-size: 2rem;
    border: 1px solid #000;
    width: 70%;
    margin: 0 auto;
    /* 使用fixed可以将表格进行等分 */
    table-layout: fixed;
    caption-side: top;
    border-collapse: collapse;
    /* border-collapse: separate; */
    /* border-spacing: 10px是在border-collapse: separate情况下使用 */
    border-spacing: 10px;
    /* empty-cells: hide也是在border-collapse: separate情况下使用 */
    empty-cells: hide;
}

.table_demo caption {
    font-size: 2.5rem;
}

.table_demo th, .table_demo td {
    border: 1px solid #000;
    /* border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    border-left: 1px solid #000;
    border-right: 1px solid #000; */
    text-align: center;
}

.table_demo thead {
    background-color: rgb(187,39,39);
    color: white;
}

.table_demo tbody tr:hover {
    background: #d8e61d;
    cursor: pointer;
}

.table_demo tfoot td {
    text-align: right;
    padding-right: 2rem;
}

/* 表单样式 */
.form_demo {
    font-size: 1.4rem;
    border: 1px solid seagreen;
    background-color: #fff;
    width: 35rem;
    height: 25rem;
    text-align: center;
}

.form_demo input[type="text"], .form_demo input[type="password"] {
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-bottom: 1px solid #000;
    width: 200px;
    height: 38px;
    padding-left: 44px;
}

.form_demo #username {
    background: #fff url(username.jpg) no-repeat top left;
}

.form_demo #pwd {
    background: #fff url(password.jpg) no-repeat top left;
}

.form_demo [type="submit"] {
    width: 100px;
    height: 38px;
    background-color: rgb(233,85,85);
    border: 1px dashed #2e5bec;
    /* 设置边框为圆角 */
    border-radius: 10px;
    color: aliceblue;
    text-align: center;
}